import {DEVELOPMENT, PRODUCTION} from '../config'

/**
 * image api 通用参数
 * @type {{format: string, ignore: boolean, clientCode: string}}
 */
export const COMMON_PARAMS = {
  format: 'json',
  ignore: true,
  clientCode: 'pc'
}
/**
 * 部分image api需要上行终端类型
 * @type {string}
 */
export const CLIENT = 'pc'

export const METHOD = {
  POST: 'post',
  GET: 'get'
}
/**
 * HTTP PROTOCOL
 * @type {string}
 */
export const HTTP_PROTOCOL = 'http://'

let apiHost = process.env.NODE_ENV === 'development' ? DEVELOPMENT : PRODUCTION
/**
 * image2 api host(artup-build)
 * @type {string}
 */
export const IMAGE_API_HOST = apiHost.IMAGE_API_HOST
export const IMAGE_API_PREFIXES = apiHost.IMAGE_API_PREFIXES
/**
 * 优惠券、礼品卡 api host
 * @type {string}
 */
export const COUPON_API_HOST = apiHost.COUPON_API_HOST
export const COUPON_API_PREFIXES = apiHost.COUPON_API_PREFIXES
/**
 * user api host
 * @type {string}
 */
export const USER_API_HOST = apiHost.USER_API_HOST
export const USER_API_PREFIXES = apiHost.USER_API_PREFIXES
/**
 * mobile api host
 * @type {string}
 */
export const MOBILE_API_HOST = apiHost.MOBILE_API_HOST
export const MOBILE_API_PREFIXES = apiHost.MOBILE_API_PREFIXES
